<include file="public@agent_header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <form action="{:url('customer_service/contract_upload')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
        <div class="row">
            <div class="col-md-3">
                <table class="table table-bordered">
                    <tr>
                        <th><b>合同</b></th>
                    </tr>
                    <tr>
                        <td>
                            <input id="file" type="hidden" name="file_urls" value="{$row.file_urls}">
                            <input class="form-control" id="file-name" type="text" name="file_names" value="{$row.file_names}"
                                   style="width: 200px;display:inline;" title="文件名称">
                            <a id="file-preview" href="" target="_blank">下载</a>
                            <a href="javascript:uploadOne('文件上传','#file','file');">上传</a>
                        </td>
                    </tr>
                </table>
                <div class="col-sm-offset-2 col-sm-10">
                    <input type="hidden" name="order_id" value="{:input('id')}">
                    <input type="hidden" name="type" value="1">
                    <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
                </div>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script type="text/javascript">
    //编辑器路径定义
    var editorURL = GV.WEB_ROOT;
</script>
<script type="text/javascript">
    $(function () {

        editorcontent = new baidu.editor.ui.Editor();
        editorcontent.render('content');
        try {
            editorcontent.sync();
        } catch (err) {
        }

        $('.btn-cancel-thumbnail').click(function () {
            $('#thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
            $('#thumbnail').val('');
        });

    });
</script>
</body>
</html>
